3.352 \(\int \frac{\tan (c+d x) (A+B \tan (c+d x))}{(a+b \tan (c+d x))^{3/2}} \, dx\)

Optimal. Leaf size=141 \[ \frac{2 a (A b-a B)}{b d \left (a^2+b^2\right ) \sqrt{a+b \tan (c+d x)}}-\frac{(A-i B) \tanh ^{-1}\left (\frac{\sqrt{a+b \tan (c+d x)}}{\sqrt{a-i b}}\right )}{d (a-i b)^{3/2}}-\frac{(A+i B) \tanh ^{-1}\left (\frac{\sqrt{a+b \tan (c+d x)}}{\sqrt{a+i b}}\right )}{d (a+i b)^{3/2}} \]

[Out]

-(((A - I*B)*ArcTanh[Sqrt[a + b*Tan[c + d*x]]/Sqrt[a - I*b]])/((a - I*b)^(3/2)*d)) - ((A + I*B)*ArcTanh[Sqrt[a
 + b*Tan[c + d*x]]/Sqrt[a + I*b]])/((a + I*b)^(3/2)*d) + (2*a*(A*b - a*B))/(b*(a^2 + b^2)*d*Sqrt[a + b*Tan[c +
 d*x]])

________________________________________________________________________________________

Rubi [A]  time = 0.280975, antiderivative size = 141, normalized size of antiderivative = 1., number of steps used = 8, number of rules used = 5, integrand size = 31, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.161, Rules used = {3591, 3539, 3537, 63, 208} \[ \frac{2 a (A b-a B)}{b d \left (a^2+b^2\right ) \sqrt{a+b \tan (c+d x)}}-\frac{(A-i B) \tanh ^{-1}\left (\frac{\sqrt{a+b \tan (c+d x)}}{\sqrt{a-i b}}\right )}{d (a-i b)^{3/2}}-\frac{(A+i B) \tanh ^{-1}\left (\frac{\sqrt{a+b \tan (c+d x)}}{\sqrt{a+i b}}\right )}{d (a+i b)^{3/2}} \]

Antiderivative was successfully verified.

[In]

Int[(Tan[c + d*x]*(A + B*Tan[c + d*x]))/(a + b*Tan[c + d*x])^(3/2),x]

[Out]

-(((A - I*B)*ArcTanh[Sqrt[a + b*Tan[c + d*x]]/Sqrt[a - I*b]])/((a - I*b)^(3/2)*d)) - ((A + I*B)*ArcTanh[Sqrt[a
 + b*Tan[c + d*x]]/Sqrt[a + I*b]])/((a + I*b)^(3/2)*d) + (2*a*(A*b - a*B))/(b*(a^2 + b^2)*d*Sqrt[a + b*Tan[c +
 d*x]])

Rule 3591

Int[((a_.) + (b_.)*tan[(e_.) + (f_.)*(x_)])^(m_)*((A_.) + (B_.)*tan[(e_.) + (f_.)*(x_)])*((c_.) + (d_.)*tan[(e
_.) + (f_.)*(x_)]), x_Symbol] :> Simp[((b*c - a*d)*(A*b - a*B)*(a + b*Tan[e + f*x])^(m + 1))/(b*f*(m + 1)*(a^2
 + b^2)), x] + Dist[1/(a^2 + b^2), Int[(a + b*Tan[e + f*x])^(m + 1)*Simp[a*A*c + b*B*c + A*b*d - a*B*d - (A*b*
c - a*B*c - a*A*d - b*B*d)*Tan[e + f*x], x], x], x] /; FreeQ[{a, b, c, d, e, f, A, B}, x] && NeQ[b*c - a*d, 0]
 && LtQ[m, -1] && NeQ[a^2 + b^2, 0]

Rule 3539

Int[((a_.) + (b_.)*tan[(e_.) + (f_.)*(x_)])^(m_)*((c_.) + (d_.)*tan[(e_.) + (f_.)*(x_)]), x_Symbol] :> Dist[(c
 + I*d)/2, Int[(a + b*Tan[e + f*x])^m*(1 - I*Tan[e + f*x]), x], x] + Dist[(c - I*d)/2, Int[(a + b*Tan[e + f*x]
)^m*(1 + I*Tan[e + f*x]), x], x] /; FreeQ[{a, b, c, d, e, f, m}, x] && NeQ[b*c - a*d, 0] && NeQ[a^2 + b^2, 0]
&& NeQ[c^2 + d^2, 0] &&  !IntegerQ[m]

Rule 3537

Int[((a_.) + (b_.)*tan[(e_.) + (f_.)*(x_)])^(m_)*((c_) + (d_.)*tan[(e_.) + (f_.)*(x_)]), x_Symbol] :> Dist[(c*
d)/f, Subst[Int[(a + (b*x)/d)^m/(d^2 + c*x), x], x, d*Tan[e + f*x]], x] /; FreeQ[{a, b, c, d, e, f, m}, x] &&
NeQ[b*c - a*d, 0] && NeQ[a^2 + b^2, 0] && EqQ[c^2 + d^2, 0]

Rule 63

Int[((a_.) + (b_.)*(x_))^(m_)*((c_.) + (d_.)*(x_))^(n_), x_Symbol] :> With[{p = Denominator[m]}, Dist[p/b, Sub
st[Int[x^(p*(m + 1) - 1)*(c - (a*d)/b + (d*x^p)/b)^n, x], x, (a + b*x)^(1/p)], x]] /; FreeQ[{a, b, c, d}, x] &
& NeQ[b*c - a*d, 0] && LtQ[-1, m, 0] && LeQ[-1, n, 0] && LeQ[Denominator[n], Denominator[m]] && IntLinearQ[a,
b, c, d, m, n, x]

Rule 208

Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(Rt[-(a/b), 2]*ArcTanh[x/Rt[-(a/b), 2]])/a, x] /; FreeQ[{a,
b}, x] && NegQ[a/b]

Rubi steps

\begin{align*} \int \frac{\tan (c+d x) (A+B \tan (c+d x))}{(a+b \tan (c+d x))^{3/2}} \, dx &=\frac{2 a (A b-a B)}{b \left (a^2+b^2\right ) d \sqrt{a+b \tan (c+d x)}}+\frac{\int \frac{A b-a B+(a A+b B) \tan (c+d x)}{\sqrt{a+b \tan (c+d x)}} \, dx}{a^2+b^2}\\ &=\frac{2 a (A b-a B)}{b \left (a^2+b^2\right ) d \sqrt{a+b \tan (c+d x)}}+\frac{(A-i B) \int \frac{1+i \tan (c+d x)}{\sqrt{a+b \tan (c+d x)}} \, dx}{2 (i a+b)}+\frac{((i a+b) (A+i B)) \int \frac{1-i \tan (c+d x)}{\sqrt{a+b \tan (c+d x)}} \, dx}{2 \left (a^2+b^2\right )}\\ &=\frac{2 a (A b-a B)}{b \left (a^2+b^2\right ) d \sqrt{a+b \tan (c+d x)}}+\frac{(A-i B) \operatorname{Subst}\left (\int \frac{1}{(-1+x) \sqrt{a-i b x}} \, dx,x,i \tan (c+d x)\right )}{2 (a-i b) d}+\frac{(A+i B) \operatorname{Subst}\left (\int \frac{1}{(-1+x) \sqrt{a+i b x}} \, dx,x,-i \tan (c+d x)\right )}{2 (a+i b) d}\\ &=\frac{2 a (A b-a B)}{b \left (a^2+b^2\right ) d \sqrt{a+b \tan (c+d x)}}-\frac{(i (A+i B)) \operatorname{Subst}\left (\int \frac{1}{-1+\frac{i a}{b}-\frac{i x^2}{b}} \, dx,x,\sqrt{a+b \tan (c+d x)}\right )}{(a+i b) b d}+\frac{(i A+B) \operatorname{Subst}\left (\int \frac{1}{-1-\frac{i a}{b}+\frac{i x^2}{b}} \, dx,x,\sqrt{a+b \tan (c+d x)}\right )}{(a-i b) b d}\\ &=-\frac{(A-i B) \tanh ^{-1}\left (\frac{\sqrt{a+b \tan (c+d x)}}{\sqrt{a-i b}}\right )}{(a-i b)^{3/2} d}-\frac{(A+i B) \tanh ^{-1}\left (\frac{\sqrt{a+b \tan (c+d x)}}{\sqrt{a+i b}}\right )}{(a+i b)^{3/2} d}+\frac{2 a (A b-a B)}{b \left (a^2+b^2\right ) d \sqrt{a+b \tan (c+d x)}}\\ \end{align*}

Mathematica [A]  time = 1.38869, size = 229, normalized size = 1.62 \[ \frac{\frac{b \left (A \left (b^2-a \sqrt{-b^2}\right )-b B \left (a+\sqrt{-b^2}\right )\right ) \tanh ^{-1}\left (\frac{\sqrt{a+b \tan (c+d x)}}{\sqrt{a-\sqrt{-b^2}}}\right )}{\sqrt{-b^2} \sqrt{a-\sqrt{-b^2}}}-\frac{b \left (A \left (a \sqrt{-b^2}+b^2\right )+b B \left (\sqrt{-b^2}-a\right )\right ) \tanh ^{-1}\left (\frac{\sqrt{a+b \tan (c+d x)}}{\sqrt{a+\sqrt{-b^2}}}\right )}{\sqrt{-b^2} \sqrt{a+\sqrt{-b^2}}}+\frac{2 a (A b-a B)}{\sqrt{a+b \tan (c+d x)}}}{b d \left (a^2+b^2\right )} \]

Antiderivative was successfully verified.

[In]

Integrate[(Tan[c + d*x]*(A + B*Tan[c + d*x]))/(a + b*Tan[c + d*x])^(3/2),x]

[Out]

((b*(A*(b^2 - a*Sqrt[-b^2]) - b*(a + Sqrt[-b^2])*B)*ArcTanh[Sqrt[a + b*Tan[c + d*x]]/Sqrt[a - Sqrt[-b^2]]])/(S
qrt[-b^2]*Sqrt[a - Sqrt[-b^2]]) - (b*(A*(b^2 + a*Sqrt[-b^2]) + b*(-a + Sqrt[-b^2])*B)*ArcTanh[Sqrt[a + b*Tan[c
 + d*x]]/Sqrt[a + Sqrt[-b^2]]])/(Sqrt[-b^2]*Sqrt[a + Sqrt[-b^2]]) + (2*a*(A*b - a*B))/Sqrt[a + b*Tan[c + d*x]]
)/(b*(a^2 + b^2)*d)

________________________________________________________________________________________

Maple [B]  time = 0.091, size = 7956, normalized size = 56.4 \begin{align*} \text{output too large to display} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(tan(d*x+c)*(A+B*tan(d*x+c))/(a+b*tan(d*x+c))^(3/2),x)

[Out]

result too large to display

________________________________________________________________________________________

Maxima [F(-1)]  time = 0., size = 0, normalized size = 0. \begin{align*} \text{Timed out} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(tan(d*x+c)*(A+B*tan(d*x+c))/(a+b*tan(d*x+c))^(3/2),x, algorithm="maxima")

[Out]

Timed out

________________________________________________________________________________________

Fricas [F(-1)]  time = 0., size = 0, normalized size = 0. \begin{align*} \text{Timed out} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(tan(d*x+c)*(A+B*tan(d*x+c))/(a+b*tan(d*x+c))^(3/2),x, algorithm="fricas")

[Out]

Timed out

________________________________________________________________________________________

Sympy [F]  time = 0., size = 0, normalized size = 0. \begin{align*} \int \frac{\left (A + B \tan{\left (c + d x \right )}\right ) \tan{\left (c + d x \right )}}{\left (a + b \tan{\left (c + d x \right )}\right )^{\frac{3}{2}}}\, dx \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(tan(d*x+c)*(A+B*tan(d*x+c))/(a+b*tan(d*x+c))**(3/2),x)

[Out]

Integral((A + B*tan(c + d*x))*tan(c + d*x)/(a + b*tan(c + d*x))**(3/2), x)

________________________________________________________________________________________

Giac [F]  time = 0., size = 0, normalized size = 0. \begin{align*} \int \frac{{\left (B \tan \left (d x + c\right ) + A\right )} \tan \left (d x + c\right )}{{\left (b \tan \left (d x + c\right ) + a\right )}^{\frac{3}{2}}}\,{d x} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(tan(d*x+c)*(A+B*tan(d*x+c))/(a+b*tan(d*x+c))^(3/2),x, algorithm="giac")

[Out]

integrate((B*tan(d*x + c) + A)*tan(d*x + c)/(b*tan(d*x + c) + a)^(3/2), x)